#ifndef DYN_FUNCTOR_MAPS1D_MANDELBROTMAP_H
#define DYN_FUNCTOR_MAPS1D_MANDELBROTMAP_H

#include <armadillo>

#include "dyn_functor_maps1d.h"

/*! \brief Mandelbröt map class.
 *
 * This class defines the Mandelbrot map.
 * It is the dynamical conjugate of the
 * LogisticMap, but it can be interesting
 * to deal with it alone.
 */

class MandelbrotMap : public Maps1D
{
public:
    /*! The construct sets the parameter c
     * and the pth iterate.
     */
    MandelbrotMap(const double x, const int p);

    /*! @name Mandelbrot Map Operations
     * We declare the fundamental map
     * operations.
     */
    //@{
    double iterate(const double x, const int p);
    double jacobian(const double x, const int p);
    double operator()(double x) {return iterate(x, getPeriod());}
    //@}

    /*! @name Accessor functions.
     * Same as LogisticMap.
     */
    //@{
    double getParameter(){return c;}
    void setParameter(const double new_c){c = new_c;}
    //@}

protected:
    /*! @name Parameters
     * We declare the c parameter.
     */
    double c;
};

#endif // DYN_FUNCTOR_MAPS1D_MANDELBROTMAP_H
